{include file="public/header" /}
<style>
body{
  background: #FFF;
}

</style>

<div class="page">
    <table class="ds-default-table order">
        <tbody>


            <tr>
                <th>{$Think.lang.order_info}</th>
            </tr>
            <tr>
                <td colspan="2"><ul>
                        <li><strong>{$Think.lang.ds_order_sn}:</strong>
                    {if condition="($order_info.app_order_type==1)"}{$order_info.order_sn}
                    {elseif condition="($order_info.app_order_type==2)"}{$project_info.order_sn}
                    {elseif condition="($order_info.app_order_type==3)"}{$order_info.order_sn}
                    {/if}
                        
                         </li>
                        <li><strong>{$Think.lang.ds_pay_sn}</strong>{$order_info.pay_sn} </li>
                        <li><strong>{$Think.lang.order_state}:</strong>{:get_order_state($order_info)}</li>

                        <li><strong>{$Think.lang.order_total_price}:</strong><span class="red_common">{$Think.lang.currency}
                    {if condition="($order_info.app_order_type==1)"}{$order_info.order_amount} 
                    {elseif condition="($order_info.app_order_type==2)"}{$order_info.project_price}
                    {elseif condition="($order_info.app_order_type==2)"}{$order_info.order_amount} 
                    {/if}
                        
                       </span>
                            {if $order_info.refund_amount > 0}
                            ({$Think.lang.order_refund}:{$Think.lang.currency}{$order_info.refund_amount})
                            {/if}
                        </li>

                        <li><strong>{$Think.lang.order_total_transport}:</strong>{$Think.lang.currency}{$order_info.shipping_fee}</li>
                    <li><!--<strong>{$Think.lang.vrorder_rcb_amount}222:</strong>{$Think.lang.currency}{$order_info.rcb_amount}--></li>
                    </ul></td>
            </tr>
            <tr>
                <td><ul>
                        <li><strong>{$Think.lang.ds_buyer_name}{$Think.lang.ds_colon}</strong>{$order_info.buyer_name}</li>
                        <li><strong>供应商名称{$Think.lang.ds_colon}</strong>{$order_info.store_name}</li>
                        <li><strong>运营商名称{$Think.lang.ds_colon}</strong>{$order_info.yys_name}</li>
                        <li><strong>{$Think.lang.ds_payment_code}{$Think.lang.ds_colon}</strong>{:get_order_payment_name($order_info['payment_code'])}</li>
                        <li><strong>{$Think.lang.order_time}{$Think.lang.ds_colon}</strong>{$order_info.add_time|date='Y-m-d H:i:s',###}</li>
                        {if isset($order_info.payment_time) && $order_info.payment_time!=''}
                        <li><strong>{$Think.lang.payment_time}{$Think.lang.ds_colon}</strong>{$order_info.payment_time|date='Y-m-d H:i:s',###}</li>
                        {/if}
                        {if isset($order_info.shipping_time) && $order_info.shipping_time!=''}
                        <li><strong>{$Think.lang.ship_time}{$Think.lang.ds_colon}</strong>{$order_info.shipping_time|date='Y-m-d H:i:s',###}</li>
                        {/if}
                        {if isset($order_info.finnshed_time) && $order_info.finnshed_time!=''}
                        <li><strong>{$Think.lang.complate_time}{$Think.lang.ds_colon}</strong>{$order_info.finnshed_time|date='Y-m-d H:i:s',###}</li>
                        {/if}
                        {if $order_info.extend_order_common.order_message != ''}
                        <li><!--<strong>{$Think.lang.buyer_message}{$Think.lang.ds_colon}</strong>{$order_info.extend_order_common.order_message}--></li>
                        {/if}
                    </ul></td>
            </tr>
            <tr>
                <th>{$Think.lang.consignee_info}</th>
            </tr>
            <tr>
                <td><ul>
                        <li><strong>{$Think.lang.consignee_name}{$Think.lang.ds_colon}</strong>{$order_info.extend_order_common.reciver_name}</li>
                        <li><strong>{$Think.lang.tel_phone}{$Think.lang.ds_colon}</strong>{$order_info.extend_order_common.reciver_info.phone|default=''}</li>
                        <li><strong>{$Think.lang.address}{$Think.lang.ds_colon}</strong>{$order_info.extend_order_common.reciver_info.address|default=''}</li>
                        {if $order_info.shipping_code != ''}
                        <li><strong>{$Think.lang.ship_code}{$Think.lang.ds_colon}</strong>{$order_info.shipping_code}</li>
                        {/if}
                    </ul></td>
            </tr>
            {notempty name="daddress_info"}
            <tr>
                <th>{$Think.lang.daddress_info}</th>
            </tr>
            <tr>
                <td><ul>
                        <li><strong>{$Think.lang.daddress_seller_name}{$Think.lang.ds_colon}</strong>{$daddress_info.seller_name}</li>
                        <li><strong>{$Think.lang.tel_phone}:</strong>{$daddress_info.daddress_telphone}</li>
                        <li><strong>{$Think.lang.daddress_address_name}{$Think.lang.ds_colon}</strong>{$daddress_info.area_info}&nbsp;{$daddress_info.daddress_detail}&nbsp;{$daddress_info.daddress_company}</li>
                    </ul></td>
            </tr>
            {/notempty}
            <?php if (!empty($order_info['extend_order_common']['invoice_info'])) {?>
            <tr>
                <th>{$Think.lang.invoice_info}</th>
            </tr>
            <tr>
                <td><ul>
                        <?php foreach ((array)$order_info['extend_order_common']['invoice_info'] as $key => $value){?>
                        <li><strong>{$key}{$Think.lang.ds_colon}</strong>{$value}</li>
                       <?php } ?>
                    </ul></td>
            </tr>
            <?php } ?>

            <tr>
                <th>发票信息</th>
            </tr>
           <tr>
               <td>
               <ul>
                   <li><strong>发票类型</strong>
                   <?php if($invoice_info['type']==1){ ?>
                            纸质发票
                        <?php }else if($invoice_info['type']==2){?>
                            电子发票
                        <?php }else{ ?>
                            增值税发票
                        <?php }?>
                   </li>
                   <li><strong>发票内容</strong>{$invoice_info.invoice_content}</li>
                   <li><strong>发票抬头：</strong>
                       <?php if($invoice_info['invoice_head']==0){ ?>
                       个人
                       <?php }else if($invoice_info['invoice_head']==1){?>
                       单位
                       <?php }else{ ?>
                       全部
                       <?php }?>
                   </li>
                         <!-- 个人 纸质 -->
                        <?php if($invoice_info['invoice_head']=='0'&&$invoice_info['invoice_texture']=='0'){ ?>
                           <li><strong>收货人{$Think.lang.ds_colon}</strong>{$invoice_info.invoice_rec_name}</li>
                            <li><strong>收货人电话:</strong>{$invoice_info.invoice_rec_mobphone}</li>
                            <li><strong>收货人地址{$Think.lang.ds_colon}</strong>{$invoice_info.invoice_goto_addr}</li>
                          
                        <?php } ?>

                        <!-- 个人 电子 -->
                        <?php if($invoice_info['invoice_head']=='0'&&$invoice_info['invoice_texture']=='1'){ ?>
                            <li><strong>手机号码：</strong>{$invoice_info.invoice_phone}</li>
                            <li><strong>电子邮箱：</strong>{$invoice_info.invoice_email}</li>
                        <?php } ?>

                        <!-- 单位 纸质 -->
                        <?php if($invoice_info['invoice_head']=='1'&&$invoice_info['invoice_texture']=='0'){ ?>
                            <li><strong>单位名称：</strong>{$invoice_info.invoice_company}</li>
                            <li><strong>单位税号：</strong>{$invoice_info.invoice_company_code}</li>
                            <li><strong>注册地址：</strong>{$invoice_info.invoice_reg_addr}</li>
                            <li><strong>注册电话：</strong>{$invoice_info.invoice_reg_phone}</li>
                            <li><strong>开户银行：</strong>{$invoice_info.invoice_reg_bname}</li>
                            <li><strong>银行账号：</strong>{$invoice_info.invoice_reg_baccount}</li>
                            <li><strong>收货人{$Think.lang.ds_colon}</strong>{$invoice_info.invoice_rec_name}</li>
                            <li><strong>收货人电话:</strong>{$invoice_info.invoice_rec_mobphone}</li>
                            <li><strong>收货人地址{$Think.lang.ds_colon}</strong>{$invoice_info.invoice_goto_addr}</li>
                        <?php } ?>

                        <!-- 单位 电子 -->
                        <?php if($invoice_info['invoice_head']=='1'&&$invoice_info['invoice_texture']=='1'){ ?>
                           <li><strong>单位名称：</strong>{$invoice_info.invoice_company}</li>
                           <li><strong>单位税号：</strong>{$invoice_info.invoice_company_code}</li>
                           <li><strong>手机号码：</strong>{$invoice_info.invoice_phone}</li>
                           <li><strong>电子邮箱：</strong>{$invoice_info.invoice_email}</li>
                        <?php } ?>
               </ul>
               </td>
           </tr>
            <tr>
                <th>{$Think.lang.product_info}
           {if condition="$order_info.app_order_type eq '2' "}
                <a style="margin-left: 567px;" href="{:url('projectorder/projectorder_list',['order_id'=>$order_info.app_order_project_id])}"  class="btn">查看项目定制详情</a>
            </th>
            {/if}
                </th>
            </tr>
            <tr>
                <td><table class="ds-default-table goods ">
                        <tbody>
                            <tr>
                                <th></th>
                                <th>{$Think.lang.product_info}</th>
                                <th class="align-center">{$Think.lang.product_price}</th>
                                <th class="align-center">{$Think.lang.goods_pay_price}</th>
                                <th class="align-center">{$Think.lang.product_num}</th>
                                <th class="align-center">商品状态</th>
                               <!-- <th class="align-center">{$Think.lang.vrorder_commis_rate}</th>
                                <th class="align-center">{$Think.lang.vrorder_commis_price}</th>-->
                            </tr>
                            {foreach name="$order_info.extend_order_goods" item="goods"}
                            <tr>
                                <td class="w60 picture"><div class="size-56x56"><span class="thumb size-56x56"><i></i>
                                    <img  src="{$http_name}/{$goods.goods_image}" width="60" height="60"/> </span></div></td>
                                <td class="w50pre"><p>{$goods.goods_name}</p><p><?php echo get_order_goodstype($goods['goods_type']);?></p></td>
                                <td class="w96 align-center"><span class="red_common">{$Think.lang.currency}{$goods.goods_price}</span></td>
                                <td class="w96 align-center"><span class="red_common">{$Think.lang.currency}{$goods.goods_pay_price}</span></td>
                                <td class="w96 align-center">{$goods.goods_num}</td>
                                <td class="w96 align-center"><?php echo $goods_status[$goods['return_status']]; ?></td>
                             <!--   <td class="w96 align-center"><?php echo $goods['commis_rate'] == 200 ? '' : $goods['commis_rate'].'%';?></td>
                                <td class="w96 align-center"><?php echo $goods['commis_rate'] == 200 ? '' : ds_price_format($goods['goods_pay_price']*$goods['commis_rate']/100);?></td>
                           --> </tr>
                           {/foreach}
                        </tbody>
                    </table>
                </td>
            </tr>
            <!-- S 促销信息 -->
            <?php if(!empty($order_info['extend_order_common']['promotion_info']) && !empty($order_info['extend_order_common']['voucher_code'])){ ?>
            <tr>
                <th>{$Think.lang.other_info}</th>
            </tr>
            <tr>
                <td>
                    <?php if(!empty($order_info['extend_order_common']['promotion_info'])){ ?>
                    <?php echo $order_info['extend_order_common']['promotion_info'];?>,
                    <?php } ?>
                    <?php if(!empty($order_info['extend_order_common']['voucher_code'])){ ?>
                    {:sprintf(lang('voucher_use_info'),$order_info['extend_order_common']['voucher_price'],$order_info['extend_order_common']['voucher_code'])}
                    <?php } ?>
                </td>
            </tr>
            <?php } ?>
            <!-- E 促销信息 -->

            {notempty name="refund_list"}
            <tr>
                <th>{$Think.lang.refund_info}</th>
            </tr>
            {foreach name="refund_list" item="val"}
            <tr>
                <td>{:sprintf(lang('refund_detail_info'),date('Y-m-d H:i:s',$val['admin_time']),$val['refund_sn'],lang('currency').$val['refund_amount'],$val['goods_name'])}</td>
            </tr>
            {/foreach}
            {/notempty}
            {notempty name="return_list"}
            <tr>
                <th>{$Think.lang.return_info}</th>
            </tr>
            {foreach name="return_list" item="val"}
            <tr>
                <td>{:sprintf(lang('return_detail_info'),date('Y-m-d H:i:s',$val['admin_time']),$val['refund_sn'],lang('currency').$val['refund_amount'],$val['goods_name'])}</td>
            </tr>
            {/foreach}
            {/notempty}
            {notempty name="order_log"}
            <tr>
                <th>{$Think.lang.order_handle_history}</th>
            </tr>
            {foreach name="order_log" item="val"}
            <tr>
                <td>
                    {$val.log_role} {$val.log_user}&emsp;{$Think.lang.order_show_at}&emsp;{$val.log_time|date="Y-m-d H:i:s",###}&emsp;{$val.log_msg}
                </td>
            </tr>
           {/foreach}
           {/notempty}
        </tbody>
    </table>
</div>